package ObjectOriented;
//记得引入接口
import Interface.MyInterface;

//定义抽象类，必须被继承
public abstract class SuperClass implements MyInterface {
    protected int age;
    protected String name;
    protected char sex;

    //定义无参构造方法，实现缺省时的赋值
    public SuperClass() {
        this.age = 0;
        this.name = "Mark";
        this.sex = '男';
    }
    //定义有参构造方法
    public SuperClass(int age, String name, char sex) {
        this.age = age;
        this.name = name;
        this.sex = sex;
    }
    public String getname() {
        return this.name;
    }

}
